package com.company.abs;

import com.company.abs.honda.HondaCarFactory;
import com.company.abs.toyota.ToyotaCarFactory;

/**
 * 超级汽车⼯⼚创造器
 */
public class CarFactoryProducer {

    public static CarFactory getCarFactory(String type) {

        if (type.equalsIgnoreCase("HONDA")) {
            return new HondaCarFactory();

        } else if (type.equalsIgnoreCase("TOYOTA")) {
            return new ToyotaCarFactory();
        }
        return null;
    }
}
